home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / DRVLIB.NIC / 3C508 / OEMSETUP.INF next >
Encoding:
INI File  |  1996-07-31  |  24.8 KB  |  745 lines

  1. [Identification]
  2.     OptionType = NetAdapter
  3. [PlatformsSupported]
  4.     PCI
  5.     ISA
  6.     EISA
  7.     "Jazz-Internal Bus"
  8. [Options]
  9.     TC508
  10. [FileConstants]
  11. UtilityInf      = "UTILITY.INF"
  12. ParamInf        = "NCPARAM.INF"
  13. subroutineinf   = "SUBROUTN.INF"
  14. SoftwareType    = "driver"
  15. Exit_Code       = 0
  16. NetEventDLL     = "%SystemRoot%\System32\netevent.dll"
  17. IoLogMsgDLL     = "%SystemRoot%\System32\IoLogMsg.dll"
  18. Manufacturer    = "Microsoft"
  19. ProductMajorVersion     = "3"
  20. ProductMinorVersion     = "11"
  21. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  22. ProductSoftwareName     = "TC508"
  23. ProductSoftwareImagePath = "\SystemRoot\System32\drivers\TC508.sys"
  24. NetRuleSoftwareType     = "TC508Sys ndisDriver TC508Driver"
  25. NetRuleSoftwareUse      = $(SoftwareType)
  26. NetRuleSoftwareBindForm = """TC508Sys"" yes no container"
  27. NetRuleSoftwareClass    = {"TC508Driver basic"}
  28. NetRuleSoftwareBindable = {"TC508Driver TC508Adapter non exclusive 100"}
  29. ProductHardwareName     = "TC508"
  30. NetRuleHardwareType     = "TC508 TC508Adapter"
  31. NetRuleHardwareBindForm = " yes yes container"
  32. NetRuleHardwareClass    = {"TC508Adapter basic"}
  33. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductSoftwareName)"\CurrentVersion"
  34. ParamKeyName    = $(!NTN_ServiceBase)"\"$(ProductHardwareName)"\Parameters"
  35. [GeneralConstants]
  36. from      = ""
  37. to        = ""
  38. ExitCodeOk     = 0
  39. ExitCodeCancel = 1
  40. ExitCodeFatal  = 2
  41. KeyNull         = ""
  42. MAXIMUM_ALLOWED   = 33554432
  43. RegistryErrorIndex = NO_ERROR
  44. KeyProduct      = ""
  45. KeyParameters   = ""
  46. TRUE            = 1
  47. FALSE           = 0
  48. NoTitle            = 0
  49. ExitState   = "Active"
  50. OldVersionExisted = $(FALSE)
  51. DriverPath      = $(!STF_NTPATH)\drivers
  52. [date]
  53.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  54. [Identify]
  55.     read-syms Identification
  56.     set Status     = STATUS_SUCCESSFUL
  57.     set Identifier = $(OptionType)
  58.     set Media      = #("Source Media Descriptions", 1, 1)
  59.     Return $(Status) $(Identifier) $(Media)
  60. [ReturnOptions]
  61.     set Status        = STATUS_FAILED
  62.     set OptionList     = {}
  63.     set OptionTextList = {}
  64.     set LanguageList = ^(LanguagesSupported, 1)
  65.     Ifcontains(i) $($0) in $(LanguageList)
  66.     ifstr(i) $($1) == ""
  67.             goto returnoptions
  68.     endif
  69.     set PlatformList = ^(PlatformsSupported, 1)
  70.     Ifcontains(i) $($1) in $(PlatformList)
  71.             goto returnoptions
  72.     else
  73.             set Status = STATUS_NOTSUPPORTED
  74.             goto finish_ReturnOptions
  75.     endif
  76.     else
  77.         set Status = STATUS_NOLANGUAGE
  78.         goto finish_ReturnOptions
  79.     endif
  80. returnoptions = +
  81.     set OptionList     = ^(Options, 1)
  82.     set OptionTextList = ^(OptionsText$($0), 1)
  83.     set Status         = STATUS_SUCCESSFUL
  84. finish_ReturnOptions = +
  85.     Return $(Status) $(OptionList) $(OptionTextList)
  86. [InstallOption]
  87.     set Status   = STATUS_FAILED
  88.     set Option   = $($1)
  89.     set SrcDir   = $($2)
  90.     set AddCopy  = $($3)
  91.     set DoCopy   = $($4)
  92.     set DoConfig = $($5)
  93.     set LanguageList = ^(LanguagesSupported, 1)
  94.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  95.     Return STATUS_NOLANGUAGE
  96.     endif
  97.     set-subst LF = "\n"
  98.     read-syms GeneralConstants
  99.     read-syms FileConstants
  100.     read-syms DialogConstants$(!STF_LANGUAGE)
  101.     ifstr(i) $(!NTN_Origination) == "NCPA"
  102.     set Continue = $(OK)
  103.     endif
  104.     read-syms FileConstants$(!STF_LANGUAGE)
  105.     detect date
  106.     set-title  $(FunctionTitle)
  107.     set to   = Begin
  108.     set from = Begin
  109.     set CommonStatus = STATUS_SUCCESSFUL
  110.     EndWait
  111. Begin = +
  112.     Set ActivateDetection = FALSE
  113.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  114.     set StartLabel = removeadapter
  115.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  116.     set StartLabel = UpgradeSoftware
  117.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  118.     set StartLabel = bindingadapter
  119.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  120.     set CommonStatus = STATUS_REBOOT
  121.     set ActivateDetection = FALSE
  122.     set StartLabel = configureadapter
  123.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  124.         Debug-Output "Cannot configure the 3Com Red driver software."
  125.         Shell $(UtilityInf),RegistryErrorString,CANNOT_CONFIGURE_SOFTWARE
  126.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  127.         Debug-Output "ShellCode error: cannot get an error string."
  128.         goto ShellCodeError
  129.         endif
  130.         set Error = $($R0)
  131.         set from = end
  132.         set to = end
  133.         goto nonfatalinfo
  134.     endif
  135.     else
  136.     set ActivateDetection = FALSE
  137.     set StartLabel = installadapter
  138.     set OEM_ABANDON_OPTIONS = {}
  139.     set OEM_ABANDON_SOFTWARE = FALSE
  140.     set OEM_ABANDON_ON = TRUE
  141.     endif
  142.     Debug-Output "oemnadeo.INF: =================================================="
  143.     Debug-Output "oemnadeo.INF: STF_CWDIR is: "$(!STF_CWDIR)
  144.     Debug-Output "oemnadeo.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  145.     Debug-Output "oemnadeo.INF: Option is: "$(Option)
  146.     Debug-Output "oemnadeo.INF: !STF_NCDETECT  is: "$(!STF_NCDETECT)
  147.     Debug-Output "oemnadeo.INF: !STF_NCOPTION  is: "$(!STF_NCOPTION)
  148.     Debug-Output "oemnadeo.INF: !STF_NCDETCARD is: "$(!STF_NCDETCARD)
  149.     Debug-Output "oemnadeo.INF: !STF_NCDETINFO is: "$(!STF_NCDETINFO)
  150.     Debug-Output "oemnadeo.INF: =================================================="
  151.     Set DetectedCard = FALSE
  152.     Ifstr(i) $(ActivateDetection) != TRUE
  153.     Goto $(StartLabel)
  154.     Endif
  155.     Set TypeList = {{IOADDR, IOADDR_Addr_List, IOBaseAddrValue}}
  156.     Debug-Output "oemnadeo.INF: Calling Param_BuildTypeLists"
  157.     Shell $(ParamInf) Param_BuildTypeLists $(Option) $(TypeList)
  158.     Set Status = $($R0)
  159.     ifstr(i) $(Status) != STATUS_SUCCESSFUL
  160.     Goto fataldetect
  161.     Endif
  162.     Debug-Output "oemnadeo.INF: Calling Param_SetDefaults"
  163.     Shell $(ParamInf) Param_SetDefaults {}
  164.     Shell $(ParamInf) HexListFromDecList $(IOADDR_Addr_List)
  165.     Set IOADDR_Hex_List = $($R0)
  166.     Ifstr(i) $(!STF_NCDETECT) == YES
  167.     Ifstr(i) $(!STF_NCOPTION) == $(Option)
  168.        Set DetectedCard = TRUE
  169.        Debug-Output "oemnadeo.INF: Setting DetectedCard to TRUE"
  170.     Endif
  171.     Endif
  172.     Shell "" DebugConfiguration "After parameter querying"
  173.     Set from = $(fatal)
  174.     Set to = $(fatal)
  175.     Goto $(StartLabel)
  176. installadapter = +
  177.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  178.     Ifstr $(KeyProduct) != $(KeyNull)
  179.     CloseRegKey $(KeyProduct)
  180.     ifstr(i) !(NTN_RegBase) == $(ProductKeyName)
  181.        Shell $(UtilityInf), VerExistedDlg, $(ProductSoftwareTitle),+
  182.            $(ProductVersion)
  183.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  184.            Debug-Output "ShellCode error: cannot get an error string."
  185.            goto ShellCodeError
  186.        endif
  187.        goto end
  188.     else
  189.        Shell $(UtilityInf), CardExistedDlg
  190.        ifint $($ShellCode) != $(!SHELL_CODE_OK)
  191.            Debug-Output "ShellCode error: cannot get an error string."
  192.            goto ShellCodeError
  193.        endif
  194.        ifstr(i) $($R1) != "OK"
  195.            set CommonStatus = STATUS_USERCANCEL
  196.            goto end
  197.        endif
  198.        set OldVersionExisted = $(TRUE)
  199.     endif
  200.     endif
  201.     Set CurrParamSettings = {}
  202.     Ifstr(i) $(DetectedCard) != TRUE
  203.     Goto adapterverify
  204.     Endif
  205.     StartWait
  206.     Shell $(ParamInf) Param_QueryCard $(!STF_NCDETCARD)
  207.     EndWait
  208.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  209.     Goto adaptersetup
  210.     Endif
  211.     Set DetectedParams = $($R1)
  212.     Debug-Output "oemnadeo.INF: Calling Param_SetDefaults to merge detected params"
  213.     Shell $(ParamInf) Param_SetDefaults $(DetectedParams)
  214.     goto adaptersetup
  215. configureadapter = +
  216.     Ifstr $(KeyProduct) == $(KeyNull)
  217.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_RegBase) $(MAXIMUM_ALLOWED) KeyProduct
  218.     Ifstr $(KeyProduct) == $(KeyNull)
  219.         set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  220.         Debug-Output "Cannot find component product key"
  221.         goto fatalregistry
  222.     Endif
  223.     Endif
  224.     Debug-Output "INF: Shelling to FindService"
  225.     Shell $(UtilityInf) FindService, $(KeyProduct)
  226.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  227.     Debug-Output "INF: FindService shell failure"
  228.     Goto ShellCodeError
  229.     Endif
  230.     Ifstr(i) $($R0) != NO_ERROR
  231.     Debug-Output "INF: FindService Shell error: "$($R0)
  232.     Goto fatalregistry
  233.     endif
  234.     Set KeyParameters = $($R2)
  235.     CloseRegKey $($R1)
  236.     Ifstr $(KeyParameters) == $(KeyNull)
  237.     set RegistryErrorIndex = CANNOT_FIND_COMPONENT_SERVICE
  238.     Debug-Output "Cannot find component service"
  239.     goto fatalregistry
  240.     endif
  241.     set OldVersionExisted = $(TRUE)
  242.     goto adapterverify
  243.     set ValueName = ""
  244.     set ValueData = ""
  245.     set ValueStr  = ""
  246.     set ValueList = {}
  247.     EnumRegValue $(KeyParameters) ValueList
  248.     ForListDo $(ValueList)
  249.     set ValueItem = $($)
  250.     set ValueName = *($(ValueItem),1)
  251.     set ValueData = *($(ValueItem),4)
  252.     Ifstr(i) $(ValueName) == "IoBaseAddress"
  253.         set IOBaseAddrValue = $(ValueData)
  254.     else-ifstr(i) $(ValueName) == "BusType"
  255.         set BusInterfaceType = $(ValueData)
  256.     else-ifstr(i) $(ValueName) == "BusNumber"
  257.         set BusNumber = $(ValueData)
  258.     endif
  259.     EndForListDo
  260.     Shell $(ParamInf) Param_SaveValues
  261.     Set CurrParamSettings = $($R0)
  262. adaptersetup = +
  263.     Shell "" DebugConfiguration "before displaying dialog"
  264.     Set from = adapteroptions
  265.     Set IOADDR_Hex_Value = *($(IOADDR_Hex_List), ~($(IOADDR_Addr_List),$(IOBaseAddrValue)))
  266.     Shell $(ParamInf) Param_ParameterConfidence
  267.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  268.     Debug-Output "oemnadeo.INF: parameter confidence too low to bypass configuration"
  269.     Goto adapteroptions
  270.     Endif
  271.     Ifstr(i) $(DetectedCard) == TRUE
  272.     Ifstr(i) $(!STF_INSTALL_MODE) != CUSTOM
  273.         Goto adapterverify
  274.     Endif
  275.     Endif
  276. adapteroptions = +
  277.     read-syms FileDependentDlg$(!STF_LANGUAGE)
  278.     ui start "InputDlg"
  279.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  280.     set IOADDR_Hex_Value = $(Combo1Out)
  281.     Set IOBaseAddrValue = *($(IOADDR_Addr_List), ~($(IOADDR_Hex_List),$(IOADDR_Hex_Value)))
  282.     ui pop 1
  283.     else-ifstr(i) $(DLGEVENT) == "BACK"
  284.     set CommonStatus = STATUS_USERCANCEL
  285.     Debug-Output "Action: exit. Bye."
  286.     ui pop 1
  287.     goto end
  288.     else
  289.     Debug-Output "Action: unknown. Bye."
  290.     ui pop 1
  291.     goto end
  292.     endif
  293.     ifstr(i) $(!STF_NCDETINFO) == {}
  294.     Shell $(UtilityInf),GetBusTypeDialog,$(ProductHardware$(Option)Description) $(BusInterfaceType) $(BusNumber)
  295.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  296.         Debug-Output "ShellCode error."
  297.         goto ShellCodeError
  298.     endif
  299.     set BusInterfaceType = $($R1)
  300.     set BusNumber = $($R2)
  301.     else
  302.     set BusInterfaceType = *($(!STF_NCDETINFO),5)
  303.     set BusNumber = *($(!STF_NCDETINFO),6)
  304.     endif
  305. adapterverify = +
  306.     Shell "" DebugConfiguration "after running dialog"
  307.     Ifstr(i) $(DetectedCard) != TRUE
  308.     Shell $(ParamInf) Param_SaveValues
  309.     Set NewParamSettings = $($R0)
  310.     Ifstr(i) $(CurrParamSettings) == {}
  311.         Set DiffParamSettings = $(NewParamSettings)
  312.     Else
  313.         Shell $(ParamInf) Param_DiffValues $(CurrParamSettings)
  314.         Set DiffParamSettings = $($R0)
  315.     Endif
  316.     Debug-Output "oemnadeo.INF: Calling Param_VerifyResources"
  317.     Shell $(ParamInf) Param_VerifyResources $(DiffParamSettings)
  318.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  319.         Debug-Output "oemnadeo.INF: Param_VerifyResources succeeded"
  320.         Goto skipoptions
  321.     Endif
  322.     Else
  323.     Set CardVerifyIndex = $(!STF_NCDETCARD)
  324.     Debug-Output "oemnadeo.INF: Calling Param_VerifyCard"
  325.     Shell $(ParamInf) Param_VerifyCard $(!STF_NCDETCARD)
  326.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  327.         Debug-Output "oemnadeo.INF: Param_VerifyCard succeeded"
  328.         Goto skipoptions
  329.     Endif
  330.     Endif
  331.     Set from = adapteroptions
  332.     Set to = skipoptions
  333.     Shell $(UtilityInf),RegistryErrorString,VERIFY_WARNING
  334.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  335.     Debug-Output "ShellCode error: cannot get an error string."
  336.     goto ShellCodeError
  337.     endif
  338.     set Error = $($R0)
  339.     Goto Warning
  340. skipoptions =+
  341.     ifint $(OldVersionExisted) == $(TRUE)
  342.     ifstr(i) $(!NTN_InstallMode) == configure
  343.         goto writeparameters
  344.     endif
  345.     endif
  346.     StartWait
  347.     ifint $(OldVersionExisted) == $(FALSE)
  348.     ifstr(i) $(!NTN_InstallMode) == "install"
  349.        Ifstr(i) $(DoCopy) == "YES"
  350.           Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  351.           Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  352.           Goto ShellCodeError
  353.           Else-Ifstr(i) $($R0) == STATUS_FAILED
  354.           Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  355.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  356.               goto ShellCodeError
  357.           endif
  358.           set Error = $($R0)
  359.           Goto fatal
  360.           Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  361.           Goto successful
  362.           Endif
  363.           Set SrcDir = $($R1)
  364.        Endif
  365.        install "Install-Option"
  366.        ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  367.           Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  368.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  369.           goto ShellCodeError
  370.           endif
  371.           set Error = $($R0)
  372.           goto fatal
  373.        endif
  374.     endif
  375.     Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  376.         $(ProductSoftwareName), +
  377.         $(ProductSoftwareName), +
  378.         $(ProductSoftwareTitle), $(STF_CONTEXTINFNAME), +
  379.         $(ProductSoftwareImagePath), "kernel", "NDIS", {}, "",+
  380.         $(NetEventDLL)
  381.     Set OEM_ABANDON_SOFTWARE = TRUE
  382.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  383.         Debug-Output "ShellCode error"
  384.         goto ShellCodeError
  385.     endif
  386.     set RegistryErrorIndex = $($R0)
  387.     set KeyProduct      = $($R1)
  388.     Set SoftNetRulesKey = $($R2)
  389.     CloseRegKey $($R3)
  390.     CloseRegKey $($R4)
  391.     CloseRegKey $($R5)
  392.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  393.         EndWait
  394.         Debug-Output "Registry error: add software components"
  395.         CloseRegKey $(KeyProduct)
  396.         CloseRegKey $(SoftNetRulesKey)
  397.         goto fatalregistry
  398.     endif
  399.     set NewValueList = {{SoftwareType,$(NoTitle),$(!REG_VT_SZ),$(SoftwareType)},+
  400.                {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  401.                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  402.                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareTitle)},+
  403.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareDescription)},+
  404.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$(ProductSoftwareName)},+
  405.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  406.     Shell  $(UtilityInf), AddValueList, $(KeyProduct), $(NewValueList)
  407.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  408.         Debug-Output "ShellCode error."
  409.         goto ShellCodeError
  410.     endif
  411.     set RegistryErrorIndex = $($R0)
  412.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  413.         EndWait
  414.         Debug-Output "Registry error: add value list."
  415.         CloseRegKey $(KeyProduct)
  416.         CloseRegKey $(SoftNetRulesKey)
  417.         goto fatalregistry
  418.     endif
  419.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareType)},+
  420.                 {use,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareUse)}, +
  421.                 {bindform,$(NoTitle),$(!REG_VT_SZ),$(NetRuleSoftwareBindForm)}, +
  422.                 {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareClass)}, +
  423.                 {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleSoftwareBindable)}, +
  424.                 {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  425.     Shell  $(UtilityInf), AddValueList, $(SoftNetRulesKey), $(NewValueList)
  426.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  427.         Debug-Output "ShellCode error."
  428.         goto ShellCodeError
  429.     endif
  430.     set RegistryErrorIndex = $($R0)
  431.     CloseRegKey $(KeyProduct)
  432.     CloseRegKey $(SoftNetRulesKey)
  433.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  434.         EndWait
  435.         Debug-Output "Resgitry error: add value list."
  436.         goto fatalregistry
  437.     endif
  438.     endif
  439.     Shell $(UtilityInf), AddHardwareComponent, $(ProductHardwareName),$(STF_CONTEXTINFNAME),$(ProductKeyName)
  440.     ifint $($R4) != -1
  441.     Set OEM_ABANDON_OPTIONS = >($(OEM_ABANDON_OPTIONS), $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards\"$($R4))
  442.     endif
  443.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  444.     Debug-Output "Cannot add hardware component"
  445.     goto ShellCodeError
  446.     endif
  447.     set RegistryErrorIndex = $($R0)
  448.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  449.     EndWait
  450.     Debug-Output "Registry error: add hardware component"
  451.     CloseRegKey $($R1)
  452.     CloseRegKey $($R2)
  453.     CloseRegKey $($R3)
  454.     goto fatalregistry
  455.     endif
  456.     set KeyParameters = $($R3)
  457.     set KeyAdapterRules = $($R2)
  458.     set AdapterNumber = $($R4)
  459.     set NewValueList = {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  460.                {Title,$(NoTitle),$(!REG_VT_SZ),"["$($R4)"] "$(ProductHardware$(Option)Title)},+
  461.                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductHardware$(Option)Description)},+
  462.                {ProductName,$(NoTitle),$(!REG_VT_SZ),$(ProductHardwareName)},+
  463.                {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  464.                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  465.     Shell  $(UtilityInf), AddValueList, $($R1), $(NewValueList)
  466.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  467.     Debug-Output "ShellCode error"
  468.     goto ShellCodeError
  469.     endif
  470.     CloseRegKey $($R1)
  471.     set TempProdName = """"$(ProductHardwareName)$(AdapterNumber)""""
  472.     set TempBindForm = $(TempProdName)$(NetRuleHardwareBindForm)
  473.     set NewValueList = {{type,$(NoTitle),$(!REG_VT_SZ),$(NetRuleHardwareType)},+
  474.             {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  475.             {class,$(NoTitle),$(!REG_VT_MULTI_SZ),$(NetRuleHardwareClass)}, +
  476.             {InfOption,$(NoTitle),$(!REG_VT_SZ),$(Option)}}
  477.     Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  478.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  479.     Debug-Output "ShellCode error."
  480.     goto ShellCodeError
  481.     endif
  482.     set RegistryErrorIndex = $($R0)
  483.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  484.     EndWait
  485.     Debug-Output "Resgitry error: add value list."
  486.     CloseRegKey $(KeyParameters)
  487.     CloseRegKey $(KeyAdapterRules)
  488.     goto fatalregistry
  489.     endif
  490.     CloseRegKey $(KeyAdapterRules)
  491.     goto writeparameters
  492. writeparameters = +
  493.     Set NewValueList = {+
  494.                {BusType,$(NoTitle),$(!REG_VT_DWORD),$(BusInterfaceType)},+
  495.                {BusNumber,$(NoTitle),$(!REG_VT_DWORD),$(BusNumber)},+
  496.                {CardType,$(NoTitle),$(!REG_VT_DWORD),0},+
  497.                {MediaType,$(NoTitle),$(!REG_VT_DWORD),1},+
  498.                {IoBaseAddress,$(NoTitle),$(!REG_VT_DWORD),$(IOBaseAddrValue)}}
  499.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  500.     CloseRegKey $(KeyParameters)
  501.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  502.     Debug-Output "ShellCode error."
  503.     goto ShellCodeError
  504.     endif
  505.     set RegistryErrorIndex = $($R0)
  506.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  507.     Debug-Output "Registry error: Add value list"
  508.     goto fatalregistry
  509.     endif
  510.     EndWait
  511.     goto successful
  512. bindingadapter =+
  513.     set Error = "Binding: Sorry, not yet implemented."
  514.     goto fatal
  515. removeadapter = +
  516.     Ifstr(i) $(ProductKeyName) == $(!NTN_RegBase)
  517.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  518.         $(ProductSoftwareName)
  519.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  520.         Debug-Output "ShellCode error"
  521.         goto ShellCodeError
  522.     endif
  523.     set RegistryErrorIndex = $($R0)
  524.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  525.         goto fatalregistry
  526.     endif
  527.     else
  528.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  529.         $(ProductSoftwareName), $(!NTN_RegBase)
  530.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  531.         Debug-Output "ShellCode error"
  532.         goto ShellCodeError
  533.     endif
  534.     set RegistryErrorIndex = $($R0)
  535.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  536.         goto fatalregistry
  537.     endif
  538.     endif
  539.     goto end
  540. UpgradeSoftware = +
  541.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  542.     Ifstr $(KeyProduct) != $(KeyNull)
  543.     install "Install-Update"
  544.     ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  545.         goto fatal
  546.     endif
  547.     SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  548.     SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  549.     CloseRegKey $(KeyProduct)
  550.     else
  551.     goto fatalregistry
  552.     endif
  553.     goto end
  554. successful = +
  555.     goto end
  556. abandon = +
  557.     ForListDo $(OEM_ABANDON_OPTIONS)
  558.     Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer), +
  559.         $(ProductSoftwareName), $($)
  560.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  561.         Debug-Output "ShellCode error"
  562.         goto ShellCodeError
  563.     endif
  564.     set RegistryErrorIndex = $($R0)
  565.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  566.         goto fatalregistry
  567.     endif
  568.     EndForListDo
  569.     Ifstr(i) $(OEM_ABANDON_SOFTWARE) == TRUE
  570.     Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), +
  571.         $(ProductSoftwareName), FALSE
  572.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  573.         Debug-Output "ShellCode error"
  574.         goto ShellCodeError
  575.     endif
  576.     set RegistryErrorIndex = $($R0)
  577.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  578.         goto fatalregistry
  579.     endif
  580.     endif
  581.     goto end
  582. warning = +
  583.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  584.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  585.     goto ShellCodeError
  586.     endif
  587.     ifstr(i) $($R1) == "OK"
  588.     goto $(to)
  589.     else-ifstr(i) $($R1) == "CANCEL"
  590.     goto $(from)
  591.     else
  592.     goto "end"
  593.     endif
  594. nonfatalinfo = +
  595.     Set Severity = STATUS
  596.     Set CommonStatus = STATUS_USERCANCEL
  597.     goto nonfatalmsg
  598. nonfatal = +
  599.     Set Severity = NONFATAL
  600.     goto nonfatalmsg
  601. nonfatalmsg = +
  602.     ifstr(i) $(Error) == ""
  603.     Set Severity = NONFATAL
  604.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  605.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  606.         goto ShellCodeError
  607.     endif
  608.     set Error = $($R0)
  609.     endif
  610.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  611.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  612.     goto ShellCodeError
  613.     endif
  614.     ifstr(i) $($R1) == "OK"
  615.     goto $(from)
  616.     else
  617.     goto "end"
  618.     endif
  619. fatalregistry = +
  620.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  621.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  622.     goto ShellCodeError
  623.     endif
  624.     set Error = $($R0)
  625.     goto fatal
  626. fataldetect = +
  627.     Shell $(UtilityInf),RegistryErrorString,CANNOT_DETECT
  628.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  629.     Debug-Output "ShellCode error: cannot get an error string."
  630.     goto ShellCodeError
  631.     endif
  632.     set Error = $($R0)
  633.     Goto fatal
  634. fatal = +
  635.     ifstr(i) $(Error) == ""
  636.     Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  637.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  638.         goto ShellCodeError
  639.     endif
  640.     set Error = $($R0)
  641.     endif
  642.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  643.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  644.     goto ShellCodeError
  645.     endif
  646.     goto setfailed
  647. ShellCodeError = +
  648.     set DlgType      = "MessageBox"
  649.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  650.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  651.     set STF_MB_TYPE  = 1
  652.     set STF_MB_ICON  = 3
  653.     set STF_MB_DEF   = 1
  654.     ui start "Error Message"
  655.     goto setfailed
  656. setfailed = +
  657.     set CommonStatus = STATUS_FAILED
  658.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  659.     set OEM_ABANDON_ON = FALSE
  660.     goto abandon
  661.     endif
  662.     goto end
  663. end = +
  664.     goto term
  665. term = +
  666.     Return $(CommonStatus)
  667. [DebugConfiguration]
  668.     Set InfName = "oemnadeo.INF"
  669.     Debug-Output $(InfName)" **CONFIGURATION STATE: "$($0)
  670.     Debug-Output $(InfName)" IOBaseAddrValue is "$(!p:IOBaseAddrValue)
  671.     return
  672. [Install-Option]
  673.     set STF_VITAL = ""
  674.     ifstr(i) $(AddCopy) == "YES"
  675.     AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  676.     endif
  677.     ifstr(i) $(DoCopy) == "YES"
  678.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  679.        CopyFilesInCopyList
  680.     endif
  681.     Exit
  682. [Install-Update]
  683.    set STF_VITAL        = ""
  684.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  685.    AddSectionFilesToCopyList Files-$(Option) $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  686.    exit
  687. [Source Media Descriptions]
  688.     ;1 = "3Com Red software diskette", TAGFILE = PARTNO
  689.      1 = "Windows NT DRVLIB"
  690.  
  691. [Signature]
  692.     FileType = MICROSOFT_DRVLIB_FILE
  693. [GetSignature]
  694.     read-syms Signature
  695.     return $(FileType)
  696.  
  697. [ProductType]
  698. STF_PRODUCT  = Winnt
  699. STF_PLATFORM = I386
  700.  
  701. [Files-Inf]
  702. 1, oemsetup.inf,    SIZE=1000,     RENAME=$(!UG_Filename)
  703.  
  704. [Files-TC508]
  705. 1, TC508.SYS , SIZE=14336
  706.  
  707. [LanguagesSupported]
  708.     ENG
  709.  
  710. [OptionsTextENG]
  711.     TC508     = "3Com 3C508 ISA Adapter"
  712.  
  713. [FileConstantsENG]
  714. ProCaption   = "Windows NT Setup"
  715. ProCancel    = "Cancel"
  716. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  717.            "Are you sure you want to cancel copying files?"
  718. ProCancelCap = "Network Setup Message"
  719. ProText1     = "Copying:"
  720. ProText2     = "To:"
  721. FunctionTitle   = "3Com 3C508 ISA Adapter Card Setup"
  722. ProductSoftwareDescription      = "3Com 3C508 ISA Adapter Driver"
  723. ProductHardwareTC508Description        = "3Com 3C508 ISA Adapter"
  724. ProductSoftwareTitle    = "3Com 3C508 ISA Adapter Driver"
  725. ProductHardwareTC508Title = "3Com 3C508 ISA Adapter"
  726. ShellCodeErrorTitle     = "Error: "$(FunctionTitle)
  727. ShellCodeErrorText      = "Shell Code Error."
  728. [DialogConstantsENG]
  729. Help        = "&Help"
  730. Exit        = "Cancel"
  731. OK          = "OK"
  732. HelpContext = ""
  733. Continue    = "Continue"
  734. Cancel      = "Cancel"
  735. [FileDependentDlgENG]
  736. Label1 = "I/O &Port Address:"
  737. DlgType = "MultiCombo"
  738. DlgTemplate = "SINGLE_COMBO"
  739. Caption = $(FunctionTitle)
  740. Combo1List = $(IOADDR_Hex_List)
  741. Combo1Out  = $(IOADDR_Hex_Value)
  742. ComboListItemsIn  = {Combo1List}
  743. ComboListItemsOut = {Combo1Out}
  744. HelpContext = $(!IDH_DB_OEMNADEO_INS)
  745.